<?php
namespace app\index\controller;

use app\admin\model\ShopIcon;
use app\admin\model\ShopLunbo;
use think\Controller;

class Indexapi extends Base
{
    public function index(){

    }
    //轮播列表
    public function lunbo(){
        $data=ShopLunbo::order('sort desc')->select();
        if($data){
            return json(['code'=>1,'msg'=>'返回成功！','data'=>$data]);
        }
        return json(['code'=>0,'msg'=>'暂无数据！','data'=>$data]);
    }
    //首页图标
    public function shopIcon(){
        $data=ShopIcon::order('icon_sort desc')->select();
        if($data){
            return json(['code'=>1,'msg'=>'返回成功！','data'=>$data]);
        }
        return json(['code'=>0,'msg'=>'暂无数据！','data'=>$data]);
    }

}
